home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 2.iso / dist / fw_libxml.idb / usr / freeware / include / gnome-xml / xmlIO.h.z / xmlIO.h
C/C++ Source or Header  |  2001-04-12  |  2KB  |  68 lines

  1. /*
  2.  * xmlIO.h : interface for the I/O interfaces used by the parser
  3.  *
  4.  * See Copyright for the status of this software.
  5.  *
  6.  * Daniel.Veillard@w3.org
  7.  */
  8.  
  9. #ifndef __XML_IO_H__
  10. #define __XML_IO_H__
  11.  
  12. #include <stdio.h>
  13. #include "tree.h"
  14. #include "parser.h"
  15. #include "encoding.h"
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
  22. typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
  23. struct _xmlParserInputBuffer {
  24.     /* Inputs */
  25.     FILE          *file;    /* Input on file handler */
  26.     void*        gzfile;    /* Input on a compressed stream */
  27.     int              fd;    /* Input on a file descriptor */
  28.     void        *httpIO;    /* Input from an HTTP stream */
  29.     void         *ftpIO;    /* Input from an FTP stream */
  30.     
  31.     xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
  32.     
  33.     xmlBufferPtr buffer;    /* Local buffer encoded in  UTF-8 */
  34. };
  35.  
  36.  
  37. /*
  38.  * Interfaces
  39.  */
  40.  
  41. xmlParserInputBufferPtr
  42.     xmlAllocParserInputBuffer        (xmlCharEncoding enc);
  43.  
  44. xmlParserInputBufferPtr
  45.     xmlParserInputBufferCreateFilename    (const char *filename,
  46.                                                  xmlCharEncoding enc);
  47. xmlParserInputBufferPtr
  48.     xmlParserInputBufferCreateFile        (FILE *file,
  49.                                                  xmlCharEncoding enc);
  50. xmlParserInputBufferPtr
  51.     xmlParserInputBufferCreateFd        (int fd,
  52.                                              xmlCharEncoding enc);
  53. int    xmlParserInputBufferRead        (xmlParserInputBufferPtr in,
  54.                          int len);
  55. int    xmlParserInputBufferGrow        (xmlParserInputBufferPtr in,
  56.                          int len);
  57. int    xmlParserInputBufferPush        (xmlParserInputBufferPtr in,
  58.                          int len,
  59.                          const char *buf);
  60. void    xmlFreeParserInputBuffer        (xmlParserInputBufferPtr in);
  61. char *    xmlParserGetDirectory            (const char *filename);
  62.  
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66.  
  67. #endif /* __XML_IO_H__ */
  68.